<template>
  <div v-if="$route.meta.useFrame != undefined && $route.meta.useFrame==false">
    <RouterView></RouterView>
  </div>
  <div v-if="$route.meta.useFrame == undefined || $route.meta.useFrame==true">
    <div class="common-layout">
      <el-container>
        <el-header>
          <el-row class="row-bg" justify="space-between">
            <el-col :span="6" class="logo">
              <img src="./assets/logo.jpg" alt="">
            </el-col>
            <el-col :span="6">
              汽销后台管理系统
            </el-col>
            <el-col :span="6">
              <el-dropdown>
                <span class="el-dropdown-link">
                  <el-icon style="color: aliceblue; font-weight: 700; padding-top: 10px;" size="20px">
                    <User />
                  </el-icon>
                  <span>美杜莎</span>
                  <el-icon class="el-icon--right">
                    <arrow-down />
                  </el-icon>
                </span>
                <template #dropdown>
                  <el-dropdown-menu>
                    <el-dropdown-item>账户与安全</el-dropdown-item>
                    <el-dropdown-item>常见问题</el-dropdown-item>
                    <el-dropdown-item>关于我们</el-dropdown-item>
                    <el-dropdown-item disabled>权限管理</el-dropdown-item>
                    <el-dropdown-item divided command="logout">注销</el-dropdown-item>
                  </el-dropdown-menu>
                </template>
              </el-dropdown>
            </el-col>
          </el-row>

        </el-header>
        <el-container>
          <el-aside width="200px">
            <Menu></Menu>
          </el-aside>
          <el-main>
            <!--路由的总出口-->
            <RouterView></RouterView>
          </el-main>
        </el-container>
      </el-container>
    </div>
  </div>

  <!-- <RouterView></RouterView> -->
</template>
<script setup lang="ts">
import { RouterView } from 'vue-router';
import Menu from './components/Menu.vue';
</script>
<style scoped>
.el-header{
  --el-header-height: 50px;
  background: #c6e2ff;
  color: #333;
  line-height: 50px;
  padding-left: 0px;
  padding-right: 0px;
}
.logo img{
  width: 200px;
  height: 50px;
}
.el-dropdown{
  line-height: 50px;
  color: #ffff;
  float: right;
  font-weight: 800;
  font-size: 18px;
}
</style>
